home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
pdrd2.zip
/
RD.ZIP
/
RD_DEMO5.PRG
< prev
next >
Wrap
Text File
|
1993-01-11
|
1KB
|
48 lines
/*
RD_DEMO5.PRG
This demonstrates the use of the API, ADr_lbuttons() to define hot
spots.
*/
#include "read.ch"
//---------
func main()
local getlist[0]
local cShort := "Short string"
local cLong := "This is a very long string. It is '@S PICTUREd'. This is the last of three sentences."
local nT := 3, nL := 10, nB := 6, nR := 50
local cColor := setcolor( if( iscolor(), "W+/BG, GR+/R,,, N/R", nil ) )
local aScn, aScn2
local bConfig := {|e| ADr_lbuttons( e,;
{ {nT-1,31,nT-1,34}, {nT-1,38,nT-1,49} },;
{|e,nth,mrow,mcol| Xbuttons5(e,nth,mrow,mcol,nB)};
);
}
cls
aScn = ADbox( nT, nL, nB, nR )
aScn2 = ADsavescn( nT-1, nL, nT-1, nR )
setpos( nT-1, nL )
dispout( " Hot Spots --> Beep │ View Keys.Rd ", if( iscolor(), "W+/B", "N/W" ) )
@nT+1, nL+2 say "Short String" adget cShort
@nT+2, nL+2 say "Long String " adget cLong picture "@S24"
ADread( getlist, bConfig )
ADrestscn( aScn2 )
ADrestscn( aScn )
setcolor( cColor )
return nil
//--------------------------------
func Xbuttons5(e,nth,mrow,mcol,nB)
if nth = 1
tone(100,1)
elseif nth = 2
ADm_rwait()
ADviewfile( "KEYS.RD",, {nB+2} )
endif
return nil